<%@page pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>todo Add</title>
<link rel="stylesheet" type="text/css" href="/css/global.css" />
</head>
<body>
<p>TODOの登録</p>
<a href="${f:url('index')}">一覧へ</a>
<form action="${f:url('add')}" method="post">
カテゴリ<br />
<select name="category">
<c:forEach var="e" items="${categories}">
  <option value="${f:h(e.stringKey)}">${f:h(e.name)}</option>
</c:forEach>
</select>
内容<br />
<input type="text" ${f:text("content")} class="${f:errorClass('content', 'error')}"/>${f:h(errors.content)}<br />
<input type="submit" value="Insert"/>
</form>
</body>
</html>
